﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.IO;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Xml.Linq;
using System.Threading;
using System.Globalization;

namespace Nivdal
{
    public partial class MatchSubstitutionInstructions : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = Resources.Resource.Default_PageTitle + ", " + Resources.Resource.MatchSubstitutionInstructions_PageTitle;
            Response.Status = "301 Moved Permanently";
            Response.AddHeader("Location", "Default.aspx");

            //if (!HttpContext.Current.User.Identity.IsAuthenticated)
            //    Response.Redirect("Default.aspx");
            //GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
            //this.Title = GND.ReturnAppTitle();
            //string UserId = GND.ReturnUserId();
            //string TeamId = null;
            //string Panel = "";
            //TeamId = (GND.ReadNivdalIntData("@UserId", "Nivdal_GetTeamIdByUserId", UserId));
            //if (TeamId == "Null")
            //    Response.Redirect("~/GeneralMessage.aspx?MessageString=M74ggdizz5wfeh");


            //string MessageString = null;
            //if (Request.QueryString["MessageString"] != null)
            //{
            //    MessageString = Request.QueryString["MessageString"].ToString();
            //    this.MessagePanel.Visible = true;
            //    this.Message.Text = MessageString;
            //}
            //if (IsPostBack)
            //    this.MessagePanel.Visible = false;

            //this.DeleteAllExistingInstructionsButton.Attributes.Add("onclick", "javascript:if(confirm('" + Resources.Resource.MatchSubstitutionInstructions_SureDeleteAllExistingInstructions + "')== false) return false;");
            //this.Message.ForeColor = System.Drawing.Color.Green;
            //string MatchId = null;

            //if (Request.QueryString["MatchId"] != null)
            //{
            //    MatchId = Request.QueryString["MatchId"].ToString();
            //    MatchIdHiddenField.Value = MatchId;
            //}

            //if (MatchId == null)
            //    Response.Redirect("GeneralMessage.aspx?MessageString=l43ZZOTLOB");


            //if (UserId == null)
            //    Response.Redirect("GeneralMessage.aspx?MessageString=l4331EOTHBB");
            //if (!GND.ReadNivdalBoolData("@UserId", "@MatchId", "Nivdal_ShouldUserGiveInstructionsToMatch", UserId, MatchId))
            //    Response.Redirect("GeneralMessage.aspx?MessageString=ko3ATUOTLOB");

            //if ((TeamId == null))
            //    Response.Redirect("~/GeneralMessage.aspx?MessageString=274ggdizz5!lk");

            //this.LanguageHiddenField.Value = GND.GetUserLanguage();

            //this.BackToTheInitialInstructionsNameHyperLink.NavigateUrl = "~/MatchInstructions.aspx?TeamId=" + TeamId + "&MatchId=" + MatchId + "&explicit=true";

            //if (Request.QueryString["Panel"] != null)
            //{
            //    Panel = Request.QueryString["Panel"];

            //    switch (Panel)
            //    {
            //        case "PlayerSub":
            //            this.SubsTabContainer.ActiveTabIndex = 0;
            //            //this.PlayerSubstitutionsButton.Enabled = false;
            //            //this.PlayerChangesButton.Enabled = true;
            //            //this.TeamChangesButton.Enabled = true;
            //            //this.PlayerSubstitutionsPanel.Visible = true;
            //            //this.PlayerBehaviourChangePanel.Visible = false;
            //            //this.TeamBehaviourChangePanel.Visible = false;
            //            break;
            //        case "PlayerBehaviour":
            //            this.SubsTabContainer.ActiveTabIndex = 1;
            //            //this.PlayerSubstitutionsButton.Enabled = true;
            //            //this.PlayerChangesButton.Enabled = false;
            //            //this.TeamChangesButton.Enabled = true;
            //            //this.PlayerSubstitutionsPanel.Visible = false;
            //            //this.PlayerBehaviourChangePanel.Visible = true;
            //            //this.TeamBehaviourChangePanel.Visible = false;
            //            break;
            //        case "TeamBehaviour":
            //            this.SubsTabContainer.ActiveTabIndex = 2;
            //            //this.PlayerSubstitutionsButton.Enabled = true;
            //            //this.PlayerChangesButton.Enabled = true;
            //            //this.TeamChangesButton.Enabled = false;
            //            //this.PlayerSubstitutionsPanel.Visible = false;
            //            //this.PlayerBehaviourChangePanel.Visible = false;
            //            //this.TeamBehaviourChangePanel.Visible = true;
            //            break;
            //        default:
            //            this.SubsTabContainer.ActiveTabIndex = 0;
            //            //this.PlayerSubstitutionsButton.Enabled = false;
            //            //this.PlayerChangesButton.Enabled = true;
            //            //this.TeamChangesButton.Enabled = true;
            //            //this.PlayerSubstitutionsPanel.Visible = true;
            //            //this.PlayerBehaviourChangePanel.Visible = false;
            //            //this.TeamBehaviourChangePanel.Visible = false;
            //            break;
            //    }

            //}
            //else
            //{
            //    this.SubsTabContainer.ActiveTabIndex = 0;
            //    //this.PlayerSubstitutionsButton.Enabled = false;
            //    //this.PlayerChangesButton.Enabled = true;
            //    //this.TeamChangesButton.Enabled = true;
            //    //this.PlayerSubstitutionsPanel.Visible = true;
            //    //this.PlayerBehaviourChangePanel.Visible = false;
            //    //this.TeamBehaviourChangePanel.Visible = false;
            //}
            //if (!IsPostBack)
            //{
            //    this.ShowExistingSubstitutionInstructionsPreMatchSqlDataSource.SelectParameters.Add("MatchId", MatchId);
            //    this.ShowExistingSubstitutionInstructionsPreMatchSqlDataSource.SelectParameters.Add("TeamId", UserTeamId());
            //    this.ShowExistingPlayerBehaviorChangesInstructionsPreMatchSqlDataSource.SelectParameters.Add("MatchId", MatchId);
            //    this.ShowExistingPlayerBehaviorChangesInstructionsPreMatchSqlDataSource.SelectParameters.Add("TeamId", UserTeamId());
            //    this.ShowExistingTeamBehaviorChangesInstructionsPreMatchSqlDataSource.SelectParameters.Add("MatchId", MatchId);
            //    this.ShowExistingTeamBehaviorChangesInstructionsPreMatchSqlDataSource.SelectParameters.Add("TeamId", UserTeamId());
            //    this.GetPlayersDDLSqlDataSource.SelectParameters.Add("TeamId", TeamId);
            //}
            //this.MatchTitleLabel.Text = GND.ReadNivdalStringData("@MatchId", "Nivdal_GetMatchTitleString", MatchId);
            //this.Title = this.MatchTitleLabel.Text + " substitution instructions - nivdal.com!";
        }

        //protected void ExistingSubstitutionsGridView_OnRowCreated(object sender, GridViewRowEventArgs e)
        //{
        //    e.Row.Cells[0].Visible = false;
        //}

        //protected void ExistingPlayerBehaviorChangesInstructionsPreMatchGridView_OnRowCreated(object sender, GridViewRowEventArgs e)
        //{
        //    e.Row.Cells[0].Visible = false;

        //}

        //protected void ExistingTeamBehaviorChangesInstructionsPreMatchGridView_OnRowCreated(object sender, GridViewRowEventArgs e)
        //{
        //    e.Row.Cells[0].Visible = false;
        //}


        //protected void Page_PreRender(Object sender, EventArgs e)
        //{
        //    try
        //    {
        //        if (!IsPostBack)
        //        {
        //            this.PlayerInDropDownList.SelectedIndex = 0;
        //            this.PlayerOutDropDownList.SelectedIndex = 0;
        //            this.PositionDropDownList.SelectedIndex = 0;
        //            this.InstructionDropDownList.SelectedIndex = 0;
        //            //this.AttitudeDropDownList.SelectedIndex = 0;
        //            //this.AggressivenessDropDownList.SelectedIndex = 0;
        //            this.PreferredActionDropDownList.SelectedIndex = 0;
        //            this.NotBeforeTextBox.Text = "0";
        //            this.PossessionTextBox.Text = "0";
        //            this.PlayerNotBeforeBehaviourTextBox.Text = "0";
        //            this.PlayerPossessionBehaviourTextBox.Text = "0";
        //            this.TeamNotBeforeBehaviourTextBox.Text = "0";
        //            this.TeamPossessionBehaviourTextBox.Text = "0";
        //        }
        //    }
        //    catch
        //    {
        //        Response.Write("pre-render");
        //    }
        //}


        //protected string ReurnMatchId()
        //{
        //    return MatchIdHiddenField.Value;
        //}



        //protected string UserTeamId()
        //{
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    string UsrId = GND.ReturnUserId();
        //    string TeamId = "";
        //    TeamId = (GND.ReadNivdalIntData("@UserId", "Nivdal_GetTeamIdByUserId", UsrId));
        //    return TeamId;
        //}


        //protected void DeleteDSI(string InstructionId, string ActivePanelString)
        //{
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    string UsrId = GND.ReturnUserId();
        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_DeleteSubstitutionInstruction";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_InstructionId = new SqlParameter();
        //    dbParam_InstructionId.ParameterName = "@InstructionId";
        //    dbParam_InstructionId.Value = InstructionId;
        //    dbParam_InstructionId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_InstructionId);

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();
        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() + "&MatchId=" + MatchId + ActivePanelString);
        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }

        //}



        //protected void DeleteSubstitutionInstruction(Object sender, GridViewCommandEventArgs e)
        //{


        //    if (e.CommandName == "DeleteSubstitutionInstruction")
        //    {
        //        // get the row index stored in the CommandArgument property
        //        int index = Convert.ToInt32(e.CommandArgument);
        //        // get the GridViewRow where the command is raised
        //        GridViewRow row = this.ExistingSubstitutionsGridView.Rows[index];
        //        string InstructionId = row.Cells[0].Text;
        //        //this.Message.Text = "DELETED SUBMITTED";
        //        DeleteDSI(InstructionId, "&Panel=PlayerSub");
        //    }
        //    else
        //        Response.Redirect("GeneralMessage.aspx?MessageString=MessageString");
        //}

        //protected void DeleteEPBCI(string InstructionId, string ActivePanelString)
        //{
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    string UsrId = GND.ReturnUserId();
        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_DeleteSubstitutionInstruction";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_InstructionId = new SqlParameter();
        //    dbParam_InstructionId.ParameterName = "@InstructionId";
        //    dbParam_InstructionId.Value = InstructionId;
        //    dbParam_InstructionId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_InstructionId);

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();

        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() + "&MatchId=" + MatchId + ActivePanelString);
        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }

        //}


        //protected void DeleteETBCI(string InstructionId, string ActivePanelString)
        //{
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    string UsrId = GND.ReturnUserId();
        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_DeleteSubstitutionInstruction";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_InstructionId = new SqlParameter();
        //    dbParam_InstructionId.ParameterName = "@InstructionId";
        //    dbParam_InstructionId.Value = InstructionId;
        //    dbParam_InstructionId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_InstructionId);

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();

        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() + "&MatchId=" + MatchId + ActivePanelString);
        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }

        //}


        //protected void DeleteBehaviorInstruction(Object sender, GridViewCommandEventArgs e)
        //{

        //    string ActivePanelString = "";
        //    if (e.CommandName == "DeleteBehaviorInstruction")
        //        ActivePanelString = "&Panel=PlayerBehaviour";
        //    else if (e.CommandName == "DeleteTeamBehaviorInstruction")
        //        ActivePanelString = "&Panel=TeamBehaviour";

        //    int InstructionId = 0;
        //    // get the row index stored in the CommandArgument property
        //    int.TryParse(e.CommandArgument as string, out InstructionId);

        //    if (InstructionId == 0)
        //    {
        //        this.Message.Text = Resources.Resource.MatchSubstitutionInstructions_ProviderAccessProblem;
        //        return;
        //    }
        //    DeleteEPBCI(InstructionId.ToString(), ActivePanelString);
        //}

        ////protected void DeleteTeamBehaviorInstruction(Object sender, GridViewCommandEventArgs e)
        ////{
        ////    int InstructionId = 0;
        ////    // get the row index stored in the CommandArgument property
        ////    int.TryParse(e.CommandArgument as string, out InstructionId);

        ////    if (InstructionId == 0)
        ////    {
        ////        this.Message.Text = "Couldn't access provider entry.";
        ////        return;
        ////    }
        ////    DeleteETBCI(InstructionId.ToString());
        ////}




        //protected void AddPlayerSubstitutions_Click(object sender, EventArgs e)
        //{
        //    string UserId = null;
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    if (MatchId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l43ZZOTLOB");
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    UserId = GND.ReturnUserId();
        //    if (UserId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l4331EOTHBB");
        //    if (!GND.ReadNivdalBoolData("@UserId", "@MatchId", "Nivdal_ShouldUserGiveInstructionsToMatch", UserId, MatchId))
        //        Response.Redirect("GeneralMessage.aspx?MessageString=ko3ATUOTLOB");
        //    string TeamId = UserTeamId();
        //    if ((TeamId == null))
        //        Response.Redirect("~/GeneralMessage.aspx?MessageString=274ggdizz5!lk");
        //    this.Message.Text = TeamId.ToString();

        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_AddPlayerSubstitutionInstruction";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    SqlParameter dbParam_TeamId = new SqlParameter();
        //    dbParam_TeamId.ParameterName = "@TeamId";
        //    dbParam_TeamId.Value = TeamId;
        //    dbParam_TeamId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_TeamId);

        //    SqlParameter dbParam_MatchId = new SqlParameter();
        //    dbParam_MatchId.ParameterName = "@MatchId";
        //    dbParam_MatchId.Value = MatchId;
        //    dbParam_MatchId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_MatchId);

        //    SqlParameter dbParam_PlayerIn = new SqlParameter();
        //    dbParam_PlayerIn.ParameterName = "@PlayerIn";
        //    dbParam_PlayerIn.Value = this.PlayerInDropDownList.SelectedValue;
        //    dbParam_PlayerIn.DbType = DbType.Decimal;
        //    dbParam_PlayerIn.Direction = ParameterDirection.Input;
        //    dbParam_PlayerIn.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_PlayerIn);

        //    SqlParameter dbParam_PlayerOut = new SqlParameter();
        //    dbParam_PlayerOut.ParameterName = "@PlayerOut";
        //    dbParam_PlayerOut.Value = this.PlayerOutDropDownList.SelectedValue;
        //    dbParam_PlayerOut.DbType = DbType.Decimal;
        //    dbParam_PlayerOut.Direction = ParameterDirection.Input;
        //    dbParam_PlayerOut.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_PlayerOut);

        //    SqlParameter dbParam_GoalsCondition = new SqlParameter();
        //    dbParam_GoalsCondition.ParameterName = "@GoalsCondition";
        //    dbParam_GoalsCondition.Value = this.GoalsConditionDropDownList.SelectedValue;
        //    dbParam_GoalsCondition.DbType = DbType.Decimal;
        //    dbParam_GoalsCondition.Direction = ParameterDirection.Input;
        //    dbParam_GoalsCondition.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_GoalsCondition);

        //    SqlParameter dbParam_Goals = new SqlParameter();
        //    dbParam_Goals.ParameterName = "@Goals";
        //    dbParam_Goals.Value = this.GoalsDropDownList.SelectedValue;
        //    dbParam_Goals.DbType = DbType.Decimal;
        //    dbParam_Goals.Direction = ParameterDirection.Input;
        //    dbParam_Goals.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_Goals);

        //    SqlParameter dbParam_PossessionOption = new SqlParameter();
        //    dbParam_PossessionOption.ParameterName = "@PossessionOption";
        //    dbParam_PossessionOption.Value = this.PossessionOptionDropDownList.SelectedValue;
        //    dbParam_PossessionOption.DbType = DbType.Decimal;
        //    dbParam_PossessionOption.Direction = ParameterDirection.Input;
        //    dbParam_PossessionOption.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_PossessionOption);

        //    SqlParameter dbParam_Possession = new SqlParameter();
        //    dbParam_Possession.ParameterName = "@Possession";
        //    dbParam_Possession.Value = this.PossessionTextBox.Text;
        //    dbParam_Possession.DbType = DbType.Decimal;
        //    dbParam_Possession.Direction = ParameterDirection.Input;
        //    dbParam_Possession.Size = 2;
        //    dbCommand.Parameters.Add(dbParam_Possession);

        //    SqlParameter dbParam_NotBefore = new SqlParameter();
        //    dbParam_NotBefore.ParameterName = "@NotBefore";
        //    dbParam_NotBefore.Value = this.NotBeforeTextBox.Text;
        //    dbParam_NotBefore.DbType = DbType.Decimal;
        //    dbParam_NotBefore.Direction = ParameterDirection.Input;
        //    dbParam_NotBefore.Size = 2;
        //    dbCommand.Parameters.Add(dbParam_NotBefore);

        //    SqlParameter dbParam_NewPosition = new SqlParameter();
        //    dbParam_NewPosition.ParameterName = "@NewPosition";
        //    dbParam_NewPosition.Value = this.PositionDropDownList.SelectedValue;
        //    dbParam_NewPosition.DbType = DbType.Decimal;
        //    dbParam_NewPosition.Direction = ParameterDirection.Input;
        //    dbParam_NewPosition.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewPosition);

        //    SqlParameter dbParam_NewInstruction = new SqlParameter();
        //    dbParam_NewInstruction.ParameterName = "@NewInstruction";
        //    dbParam_NewInstruction.Value = this.InstructionDropDownList.SelectedValue;
        //    dbParam_NewInstruction.DbType = DbType.Decimal;
        //    dbParam_NewInstruction.Direction = ParameterDirection.Input;
        //    dbParam_NewInstruction.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewInstruction);

        //    SqlParameter dbParam_NewAttitude = new SqlParameter();
        //    dbParam_NewAttitude.ParameterName = "@NewAttitude";
        //    //dbParam_NewAttitude.Value = this.AttitudeDropDownList.SelectedValue;
        //    dbParam_NewAttitude.Value = 0;
        //    dbParam_NewAttitude.DbType = DbType.Decimal;
        //    dbParam_NewAttitude.Direction = ParameterDirection.Input;
        //    dbParam_NewAttitude.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewAttitude);

        //    SqlParameter dbParam_NewAggressiveness = new SqlParameter();
        //    dbParam_NewAggressiveness.ParameterName = "@NewAggressiveness";
        //    //dbParam_NewAggressiveness.Value = this.AggressivenessDropDownList.SelectedValue;
        //    dbParam_NewAggressiveness.Value = 0;
        //    dbParam_NewAggressiveness.DbType = DbType.Decimal;
        //    dbParam_NewAggressiveness.Direction = ParameterDirection.Input;
        //    dbParam_NewAggressiveness.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewAggressiveness);

        //    SqlParameter dbParam_NewPreferredAction = new SqlParameter();
        //    dbParam_NewPreferredAction.ParameterName = "@NewPreferredAction ";
        //    dbParam_NewPreferredAction.Value = this.PreferredActionDropDownList.SelectedValue;
        //    dbParam_NewPreferredAction.DbType = DbType.Decimal;
        //    dbParam_NewPreferredAction.Direction = ParameterDirection.Input;
        //    dbParam_NewPreferredAction.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewPreferredAction);

        //    SqlParameter dbParam_Language = new SqlParameter();
        //    dbParam_Language.ParameterName = "@Language";
        //    dbParam_Language.Value = GND.GetUserLanguage();
        //    dbParam_Language.DbType = DbType.Decimal;
        //    dbParam_Language.Direction = ParameterDirection.Input;
        //    dbParam_Language.Size = 3;
        //    dbCommand.Parameters.Add(dbParam_Language);


        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();
        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() + "&MatchId=" + MatchId
        //            + "&Panel=PlayerSub");

        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.ForeColor = System.Drawing.Color.Red;
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }

        //}
        //protected void AddPlayerBehaviour_Click(object sender, EventArgs e)
        //{

        //    string UserId = null;
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    if (MatchId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l43ZZOTLOB");
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    UserId = GND.ReturnUserId();
        //    if (UserId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l4331EOTHBB");
        //    if (!GND.ReadNivdalBoolData("@UserId", "@MatchId", "Nivdal_ShouldUserGiveInstructionsToMatch", UserId, MatchId))
        //        Response.Redirect("GeneralMessage.aspx?MessageString=ko3ATUOTLOB");
        //    string TeamId = UserTeamId();
        //    if ((TeamId == null))
        //        Response.Redirect("~/GeneralMessage.aspx?MessageString=274ggdizz5!lk");
        //    this.Message.Text = TeamId.ToString();

        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_AddPlayerBehaviorChangeInstruction";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    SqlParameter dbParam_TeamId = new SqlParameter();
        //    dbParam_TeamId.ParameterName = "@TeamId";
        //    dbParam_TeamId.Value = TeamId;
        //    dbParam_TeamId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_TeamId);

        //    SqlParameter dbParam_MatchId = new SqlParameter();
        //    dbParam_MatchId.ParameterName = "@MatchId";
        //    dbParam_MatchId.Value = MatchId;
        //    dbParam_MatchId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_MatchId);

        //    SqlParameter dbParam_Player = new SqlParameter();
        //    dbParam_Player.ParameterName = "@Player";
        //    dbParam_Player.Value = this.PlayerBehaviourDropDownList.SelectedValue;
        //    dbParam_Player.DbType = DbType.Decimal;
        //    dbParam_Player.Direction = ParameterDirection.Input;
        //    dbParam_Player.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_Player);

        //    SqlParameter dbParam_GoalsCondition = new SqlParameter();
        //    dbParam_GoalsCondition.ParameterName = "@GoalsCondition";
        //    dbParam_GoalsCondition.Value = this.PlayerGoalsConditionBehaviourDropDownList.SelectedValue;
        //    dbParam_GoalsCondition.DbType = DbType.Decimal;
        //    dbParam_GoalsCondition.Direction = ParameterDirection.Input;
        //    dbParam_GoalsCondition.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_GoalsCondition);

        //    SqlParameter dbParam_Goals = new SqlParameter();
        //    dbParam_Goals.ParameterName = "@Goals";
        //    dbParam_Goals.Value = this.PlayerGoalsBehaviourDropDownList.SelectedValue;
        //    dbParam_Goals.DbType = DbType.Decimal;
        //    dbParam_Goals.Direction = ParameterDirection.Input;
        //    dbParam_Goals.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_Goals);

        //    SqlParameter dbParam_PossessionOption = new SqlParameter();
        //    dbParam_PossessionOption.ParameterName = "@PossessionOption";
        //    dbParam_PossessionOption.Value = this.PlayerPossessionOptionBehaviourDropDownList.SelectedValue;
        //    dbParam_PossessionOption.DbType = DbType.Decimal;
        //    dbParam_PossessionOption.Direction = ParameterDirection.Input;
        //    dbParam_PossessionOption.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_PossessionOption);

        //    SqlParameter dbParam_Possession = new SqlParameter();
        //    dbParam_Possession.ParameterName = "@Possession";
        //    dbParam_Possession.Value = this.PlayerPossessionBehaviourTextBox.Text;
        //    dbParam_Possession.DbType = DbType.Decimal;
        //    dbParam_Possession.Direction = ParameterDirection.Input;
        //    dbParam_Possession.Size = 2;
        //    dbCommand.Parameters.Add(dbParam_Possession);

        //    SqlParameter dbParam_NotBefore = new SqlParameter();
        //    dbParam_NotBefore.ParameterName = "@NotBefore";
        //    dbParam_NotBefore.Value = this.PlayerNotBeforeBehaviourTextBox.Text;
        //    dbParam_NotBefore.DbType = DbType.Decimal;
        //    dbParam_NotBefore.Direction = ParameterDirection.Input;
        //    dbParam_NotBefore.Size = 2;
        //    dbCommand.Parameters.Add(dbParam_NotBefore);

        //    SqlParameter dbParam_NewPosition = new SqlParameter();
        //    dbParam_NewPosition.ParameterName = "@NewPosition";
        //    dbParam_NewPosition.Value = this.PlayerPositionBehaviourDropDownList.SelectedValue;
        //    dbParam_NewPosition.DbType = DbType.Decimal;
        //    dbParam_NewPosition.Direction = ParameterDirection.Input;
        //    dbParam_NewPosition.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewPosition);

        //    SqlParameter dbParam_NewInstruction = new SqlParameter();
        //    dbParam_NewInstruction.ParameterName = "@NewInstruction";
        //    dbParam_NewInstruction.Value = this.PlayerNewInstructionBehaviourDropDownList.SelectedValue;
        //    dbParam_NewInstruction.DbType = DbType.Decimal;
        //    dbParam_NewInstruction.Direction = ParameterDirection.Input;
        //    dbParam_NewInstruction.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewInstruction);

        //    SqlParameter dbParam_NewAttitude = new SqlParameter();
        //    dbParam_NewAttitude.ParameterName = "@NewAttitude";
        //    //dbParam_NewAttitude.Value = this.PlayerNewAttitudeBehaviourDropDownList.SelectedValue;
        //    dbParam_NewAttitude.Value = 0;
        //    dbParam_NewAttitude.DbType = DbType.Decimal;
        //    dbParam_NewAttitude.Direction = ParameterDirection.Input;
        //    dbParam_NewAttitude.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewAttitude);

        //    SqlParameter dbParam_NewAggressiveness = new SqlParameter();
        //    dbParam_NewAggressiveness.ParameterName = "@NewAggressiveness";
        //    //dbParam_NewAggressiveness.Value = this.PlayerAggressivenessBehaviourDropDownList.SelectedValue;
        //    dbParam_NewAggressiveness.Value = 0;
        //    dbParam_NewAggressiveness.DbType = DbType.Decimal;
        //    dbParam_NewAggressiveness.Direction = ParameterDirection.Input;
        //    dbParam_NewAggressiveness.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewAggressiveness);

        //    SqlParameter dbParam_NewPreferredAction = new SqlParameter();
        //    dbParam_NewPreferredAction.ParameterName = "@NewPreferredAction ";
        //    dbParam_NewPreferredAction.Value = this.PlayerPreferredActionBehaviourDropDownList.SelectedValue;
        //    dbParam_NewPreferredAction.DbType = DbType.Decimal;
        //    dbParam_NewPreferredAction.Direction = ParameterDirection.Input;
        //    dbParam_NewPreferredAction.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewPreferredAction);

        //    SqlParameter dbParam_Language = new SqlParameter();
        //    dbParam_Language.ParameterName = "@Language";
        //    dbParam_Language.Value = GND.GetUserLanguage();
        //    dbParam_Language.DbType = DbType.Decimal;
        //    dbParam_Language.Direction = ParameterDirection.Input;
        //    dbParam_Language.Size = 3;
        //    dbCommand.Parameters.Add(dbParam_Language);

        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();
        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() + "&MatchId=" + MatchId
        //            + "&Panel=PlayerBehaviour");

        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.ForeColor = System.Drawing.Color.Red;
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }


        //}
        //protected void AddTeamBehaviour_Click(object sender, EventArgs e)
        //{
        //    string UserId = null;
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    if (MatchId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l43ZZOTLOB");
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    UserId = GND.ReturnUserId();
        //    if (UserId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l4331EOTHBB");
        //    if (!GND.ReadNivdalBoolData("@UserId", "@MatchId", "Nivdal_ShouldUserGiveInstructionsToMatch", UserId, MatchId))
        //        Response.Redirect("GeneralMessage.aspx?MessageString=ko3ATUOTLOB");
        //    string TeamId = UserTeamId();
        //    if ((TeamId == null))
        //        Response.Redirect("~/GeneralMessage.aspx?MessageString=274ggdizz5!lk");
        //    //this.Message.Text = TeamId.ToString();

        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_AddTeamBehaviorChangeInstruction";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    SqlParameter dbParam_TeamId = new SqlParameter();
        //    dbParam_TeamId.ParameterName = "@TeamId";
        //    dbParam_TeamId.Value = TeamId;
        //    dbParam_TeamId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_TeamId);

        //    SqlParameter dbParam_MatchId = new SqlParameter();
        //    dbParam_MatchId.ParameterName = "@MatchId";
        //    dbParam_MatchId.Value = MatchId;
        //    dbParam_MatchId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_MatchId);

        //    SqlParameter dbParam_GoalsCondition = new SqlParameter();
        //    dbParam_GoalsCondition.ParameterName = "@GoalsCondition";
        //    dbParam_GoalsCondition.Value = this.TeamGoalsConditionBehaviourDropDownList.SelectedValue;
        //    dbParam_GoalsCondition.DbType = DbType.Decimal;
        //    dbParam_GoalsCondition.Direction = ParameterDirection.Input;
        //    dbParam_GoalsCondition.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_GoalsCondition);

        //    SqlParameter dbParam_Goals = new SqlParameter();
        //    dbParam_Goals.ParameterName = "@Goals";
        //    dbParam_Goals.Value = this.TeamGoalsBehaviourDropDownList.SelectedValue;
        //    dbParam_Goals.DbType = DbType.Decimal;
        //    dbParam_Goals.Direction = ParameterDirection.Input;
        //    dbParam_Goals.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_Goals);

        //    SqlParameter dbParam_PossessionOption = new SqlParameter();
        //    dbParam_PossessionOption.ParameterName = "@PossessionOption";
        //    dbParam_PossessionOption.Value = this.TeamPossessionOptionBehaviourDropDownList.SelectedValue;
        //    dbParam_PossessionOption.DbType = DbType.Decimal;
        //    dbParam_PossessionOption.Direction = ParameterDirection.Input;
        //    dbParam_PossessionOption.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_PossessionOption);

        //    SqlParameter dbParam_Possession = new SqlParameter();
        //    dbParam_Possession.ParameterName = "@Possession";
        //    dbParam_Possession.Value = this.TeamPossessionBehaviourTextBox.Text;
        //    dbParam_Possession.DbType = DbType.Decimal;
        //    dbParam_Possession.Direction = ParameterDirection.Input;
        //    dbParam_Possession.Size = 2;
        //    dbCommand.Parameters.Add(dbParam_Possession);

        //    SqlParameter dbParam_NotBefore = new SqlParameter();
        //    dbParam_NotBefore.ParameterName = "@NotBefore";
        //    dbParam_NotBefore.Value = this.TeamNotBeforeBehaviourTextBox.Text;
        //    dbParam_NotBefore.DbType = DbType.Decimal;
        //    dbParam_NotBefore.Direction = ParameterDirection.Input;
        //    dbParam_NotBefore.Size = 2;
        //    dbCommand.Parameters.Add(dbParam_NotBefore);

        //    SqlParameter dbParam_NewAttitude = new SqlParameter();
        //    dbParam_NewAttitude.ParameterName = "@NewTeamAttitude";
        //    dbParam_NewAttitude.Value = this.TeamNewAttitudeBehaviourDropDownList.SelectedValue;
        //    dbParam_NewAttitude.DbType = DbType.Decimal;
        //    dbParam_NewAttitude.Direction = ParameterDirection.Input;
        //    dbParam_NewAttitude.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewAttitude);

        //    SqlParameter dbParam_NewAggressiveness = new SqlParameter();
        //    dbParam_NewAggressiveness.ParameterName = "@NewTeamAggressiveness";
        //    dbParam_NewAggressiveness.Value = this.TeamAggressivenessBehaviourDropDownList.SelectedValue;
        //    dbParam_NewAggressiveness.DbType = DbType.Decimal;
        //    dbParam_NewAggressiveness.Direction = ParameterDirection.Input;
        //    dbParam_NewAggressiveness.Size = 12;
        //    dbCommand.Parameters.Add(dbParam_NewAggressiveness);

        //    SqlParameter dbParam_Language = new SqlParameter();
        //    dbParam_Language.ParameterName = "@Language";
        //    dbParam_Language.Value = GND.GetUserLanguage();
        //    dbParam_Language.DbType = DbType.Decimal;
        //    dbParam_Language.Direction = ParameterDirection.Input;
        //    dbParam_Language.Size = 3;
        //    dbCommand.Parameters.Add(dbParam_Language);

        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();
        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() +
        //            "&MatchId=" + MatchId + "&Panel=TeamBehaviour");

        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.ForeColor = System.Drawing.Color.Red;
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }


        //}
        //protected void DeleteAllExistingInstructionsButton_Click(object sender, EventArgs e)
        //{
        //    string UserId = null;
        //    string MatchId = null;
        //    if (Request.QueryString["MatchId"] != null)
        //    {
        //        MatchId = Request.QueryString["MatchId"].ToString();
        //    }
        //    if (MatchId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l43ZZOTLOB");
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    UserId = GND.ReturnUserId();
        //    if (UserId == null)
        //        Response.Redirect("GeneralMessage.aspx?MessageString=l4331EOTHBB");
        //    if (!GND.ReadNivdalBoolData("@UserId", "@MatchId", "Nivdal_ShouldUserGiveInstructionsToMatch", UserId, MatchId))
        //        Response.Redirect("GeneralMessage.aspx?MessageString=ko3ATUOTLOB");
        //    string TeamId = UserTeamId();
        //    if ((TeamId == null))
        //        Response.Redirect("~/GeneralMessage.aspx?MessageString=274ggdizz5!lk");

        //    string conn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        //    System.Data.IDbConnection dbConnection = new System.Data.SqlClient.SqlConnection(conn);
        //    System.Data.IDbCommand dbCommand = new System.Data.SqlClient.SqlCommand();
        //    dbCommand.CommandText = "Nivdal_DeleteAllSubstitutionInstructionsForMatch";
        //    dbCommand.CommandType = CommandType.StoredProcedure;
        //    dbCommand.Connection = dbConnection;

        //    SqlParameter dbParam_Answer = new SqlParameter();
        //    dbParam_Answer.ParameterName = "@Answer";
        //    dbParam_Answer.Value = "";
        //    dbParam_Answer.DbType = DbType.String;
        //    dbParam_Answer.Direction = ParameterDirection.Output;
        //    dbParam_Answer.Size = 64;
        //    dbCommand.Parameters.Add(dbParam_Answer);

        //    SqlParameter dbParam_TeamId = new SqlParameter();
        //    dbParam_TeamId.ParameterName = "@TeamId";
        //    dbParam_TeamId.Value = TeamId;
        //    dbParam_TeamId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_TeamId);

        //    SqlParameter dbParam_MatchId = new SqlParameter();
        //    dbParam_MatchId.ParameterName = "@MatchId";
        //    dbParam_MatchId.Value = MatchId;
        //    dbParam_MatchId.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_MatchId);

        //    SqlParameter dbParam_Language = new SqlParameter();
        //    dbParam_Language.ParameterName = "@Language";
        //    dbParam_Language.Value = GND.GetUserLanguage();
        //    dbParam_Language.DbType = DbType.String;
        //    dbCommand.Parameters.Add(dbParam_Language);

        //    try
        //    {

        //        dbConnection.Open();
        //        dbCommand.ExecuteScalar();
        //        Response.Redirect("MatchSubstitutionInstructions.aspx?MessageString=" + dbParam_Answer.Value.ToString() + "&MatchId=" + MatchId);
        //    }
        //    catch (Exception SQLDBException)
        //    {
        //        this.Message.ForeColor = System.Drawing.Color.Red;
        //        this.Message.Text = Convert.ToString(SQLDBException);
        //    }

        //    finally
        //    {
        //        dbConnection.Close();
        //    }

        //}

        //protected void DoneButton_Click(object sender, EventArgs e)
        //{
        //    string TeamId = UserTeamId();
        //    if ((TeamId == null))
        //        Response.Redirect("~/GeneralMessage.aspx?MessageString=274ggdizz5!lk");
        //    Response.Redirect("ListOfTeamMatches.aspx?TeamId=" + TeamId);

        //}


        ////protected void PlayerSubstitutionsButtonClick(object sender, EventArgs e)
        ////{
        ////    this.PlayerSubstitutionsPanel.Visible = true;
        ////    this.PlayerBehaviourChangePanel.Visible = false;
        ////    this.TeamBehaviourChangePanel.Visible = false;        

        ////    this.PlayerSubstitutionsButton.Enabled = false;
        ////    this.TeamChangesButton.Enabled = true;
        ////    this.PlayerChangesButton.Enabled = true;

        ////}

        ////protected void PlayerInstructionsButtonClick(object sender, EventArgs e)
        ////{
        ////    this.PlayerSubstitutionsPanel.Visible = false;
        ////    this.PlayerBehaviourChangePanel.Visible = true;
        ////    this.TeamBehaviourChangePanel.Visible = false;

        ////    this.PlayerSubstitutionsButton.Enabled = true;
        ////    this.PlayerChangesButton.Enabled = false; 
        ////    this.TeamChangesButton.Enabled = true;

        ////}

        ////protected void TeamInstructionsButtonClick(object sender, EventArgs e)
        ////{
        ////    this.PlayerSubstitutionsPanel.Visible = false;
        ////    this.PlayerBehaviourChangePanel.Visible = false;
        ////    this.TeamBehaviourChangePanel.Visible = true;

        ////    this.PlayerSubstitutionsButton.Enabled = true;
        ////    this.PlayerChangesButton.Enabled = true;
        ////    this.TeamChangesButton.Enabled = false;
        ////}

        //protected override void InitializeCulture()
        //{
        //    GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
        //    string UserUICulture = GND.GetUserUICulture();
        //    string UserCulture = GND.GetUserCulture();
        //    Thread.CurrentThread.CurrentUICulture = new CultureInfo(UserUICulture);
        //    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(UserCulture);
        //}

        //protected string FriendlyChallangeButtonOnClientClick()
        //{
        //    return ("return confirm('" + Resources.Resource.MatchSubstitutionInstructions_FriendlyChallangeDeleteInstructionOnButtonClickQuestion + "')");
        //}
    }
}